Subject: Re: Looping Brush effect?
From: [email-masked]
To: LightWave Mail List <[email-masked]>
Date: Mon, 1 May 1995 18:52:16 -0400

On Sat, 29 Apr 1995, Thomas Healy wrote:

> I'm trying to figure out how to do a "Looping Anim-Brush" effect in LW
> like you can do in Dpaint.  I.E.: I have a 60 frame loop of a walking figure 
> and I want to incorperate it into a longer Animation where the figure walks
> through a room and out.  What I'm looking to do is like what you can do in
> Dpaint.  Take a "Anim-Brush" and loop it within the Animation.  Is there a
> way to do this in LW? The closest thing I can figure is to manipulate the
> motion path of the walking figure.  Anyone have any Sugestions??

Hmmm...I'm not sure if you're asking about looping the movements of an 
object or using a looping image sequence within your LightWave animation,
so I'll cover both!

To make an object repeat it's movements throughout a scene, simply select 
that object's Motion graph by pressing 'M' and then click on the Repeat key.
Whatever motion you've defined for that object will repeat throughout the 
entire animation.  Please note though, that if you've animated the object 
using Bones, then you'll need to click on Repeat for each bone's motion 
graph.

Now, if you want to use an "anim-brush" within a LightWave animation, the 
looping anim brush will need to be saved as individual sequential images 
(an Image Sequence).  So, load your anim brush into DPaint, and save it 
as an image sequence...when you select the Save Picture option, you'll 
see "From" and "To" fields, which should be set to the first frame for 
"From" (usually 1) and the last frame for "To"...when you click Save, 
DPaint will save your image sequence by appending the appropriate frame 
number onto the save file name.  So you've saved the actual image sequence
you'll need for brush mapping, but you still need to save an Alpha image 
sequence to use for clip mapping, so go into the palette menu and change 
all the colors (except for the black background) to solid bright white 
(values of 15,15,15)...so you'll now have an animation of a white shape 
against a black background.  Save this image sequence the same way you 
did before but use a slightly different filename and maybe a different 
directory.  You now have two sets of image sequences which you will then 
map onto an object in LightWave.

Enter LightWave and then Modeler...select the Box tool and draw a 
rectangle in the X/Y view that's maybe 6 units wide by 4 units high.  
Click Make.  Select Polygon from the TOP of the screen and then click the 
Surface button on the left side of the screen...type in an appropriate 
surface name for the rectangular polygon you just made(ex:plane).  Select 
Object from the top of the screen and Export this object as whatever you 
want to call it (ex:plane.lwob).  Go back to LightWave's Layout screen.

Select Images from the top of the screen and click on Load Image Sequence,
find the first image sequence you saved from Dpaint and click on one of 
the frames...then remove the last three number from the filename and 
press enter (so if the image filename is "FRED.004", you should have 
entered "FRED.")...no image will be loaded just yet, but LightWave knows 
where to look for it when it's ready....next you want to click on Loop 
Sequence and enter the number of frames in the image sequence.  Now do 
the exact same thing for the second image sequence you saved from DPaint 
but use the different filename/directory you saved the second image 
sequence under.

Next, select the Surfaces menu and find the polygon surface name you 
selected for your object (ex:plane)...click the little T button (for 
Texture) next to the Color selector window...you'll see Planar Image Map, 
which is what we'll use here, and a bar under it that says "None"...put 
the mouse pointer on the bar with "None" in it, hold down the left mouse 
button and find the first image sequence you loaded into LW.  Click the 
"Z" axis button and then click Automatic Sizing, also click okay when the 
Automatic Sizing warning appears.  Then click on Use Texture at the 
bottom of the screen.

Next, select the Objects menu and find the name of the object you 
exported from Modeler...click the "T" (Texture) button next to Clip Map.
Select the second image sequence you loaded into LW, set it for the Z 
axis and hit the Automatic Sizing button like you did for the first image 
sequence under the Surfaces menu...last, click on the Negative Image 
button.  Clip Mapping will cut out any parts of an object that have white 
mapped onto it, so everywhere there was black in your Alpha image 
sequence will now be white (Negative) and your object will be cut out to 
match these areas of white.  Click Use Texture and then save your objects 
and this scene.

Whew!  You're ready to render now....what you should end up with when you 
render is the image of your anim brush on a flat "cardboard cutout" object.
Since you selected Loop Sequence, the images used for brush mapping and 
clip mapping will automatically repeat throughout the length of you 
animation.  You can then move the object through the scene, thus 
mimicking DPaint's Move function.  

This technique would be especially useful if you had an image sequence of 
a person running or swimming...you could move the object across the 
screen and it would look as if the person were running or swimming across 
the screen...you could then add objects in front of and behind this 
person and get a nice layering effect.  =)

If you have any questions about what I've described above, then ask away...

                                      -David Warner
                                       Event Horizon Graphics